package com.eati.cm.view;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

// 控制器統一返回格式
public class Result<T> implements IResult {

    public ResultStatus status;
    public T data;
    public String opMsgType;
    public Object opMsg;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    public Date finishedDate;


    @Override
    public ResultStatus getStatus() {
        return status;
    }

    @Override
    public Object getData() {
        return data;
    }

    @Override
    public Object getOpMsg(){
        return opMsg;
    }

    @Override
    public String getOpMsgType(){
        return opMsgType;
    }

    @Override
    public Date getFinishedDate(){
        return finishedDate;
    }
}
